package java8_24;

/**
 * @author oldliu
 * @since 1.0
 */
public class TeacherTest {
    public static void main(String[] args) {
        Teacher t=new Teacher();
        //t.name="小郭";
        //t.age=-23;
        t.setName("老郭");
        t.setAge(31);
        t.show();
        //单独获得名字
        String n=t.getName();
        System.out.println("名字是"+n);
        int a=t.getAge();
        System.out.println("年龄是"+a+"岁");
        //if(a>30)
        System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
        Teacher t2=new Teacher("小刘",15);
        t2.show();
    }
}
